<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="JavaScript/jquery.min.js"></script>
</head>
<style type="text/css">
    * {
        margin: 0;
        padding: 0;
    }
    
    img {
        display: block;
    }
    
    ul {
        list-style: none;
    }
    
    .king {
        width: 852px;
        margin: 100px auto;
        background: url(images/bg.png) no-repeat;
        overflow: hidden;
        padding: 10px;
    }
    
    .king ul {
        overflow: hidden;
    }
    
    .king li {
        position: relative;
        float: left;
        width: 69px;
        height: 69px;
        margin-right: 10px;
    }
    
    .king li.current {
        width: 224px;
    }
    
    .king li.current .big {
        display: block;
    }
    
    .king li.current .small {
        display: none;
    }
    
    .big {
        width: 224px;
        display: none;
    }
    
    .small {
        position: absolute;
        top: 0;
        left: 0;
        width: 69px;
        height: 69px;
        border-radius: 5px;
    }
</style>


<body>
    <script>
        $(function() {
            // 鼠标经过小li有两步操作
            $(".king li").mouseover(function() {
                // 1.当前小li宽度变为224px，li里面的大图片淡入，小图片淡出
                $(this).stop().animate({
                    width: 224
                }).find(".big").stop().fadeIn().siblings(".small").stop().fadeOut();
                // 2.li的其他兄弟宽度变为69px，其他li里面的大图片淡出，小图片淡入
                $(this).siblings().stop().animate({
                    width: 69
                }).find(".big").stop().fadeOut().siblings(".small").stop().fadeIn();
            })
        })
    </script>
    <div class="king">
        <ul>
            <li class="current">
                <a href="#">
                    <img src="images/m1.jpg" alt="" class="small">
                    <img src="images/m.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/l1.jpg" alt="" class="small">
                    <img src="images/l.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/c1.jpg" alt="" class="small">
                    <img src="images/c.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/w1.jpg" alt="" class="small">
                    <img src="images/w.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/z1.jpg" alt="" class="small">
                    <img src="images/z.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/h1.jpg" alt="" class="small">
                    <img src="images/h.png" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="images/t1.jpg" alt="" class="small">
                    <img src="images/t.png" alt="" class="big">
                </a>
            </li>
        </ul>

    </div>
</body>

</html>